<!DOCTYPE >
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			// console.log(num0);
				//执行的话会报错,显示无法找到变量num0
			
			console.log(num1);// => undefined
			var num1 = 1;
				//执行不会报错,也就是说会被拆分成代码
				/* 
					var num1;
					console.log(num1);
					num1 = 1;
				 */
			
			var num2 = 2;
			console.log(num2);
			
			var num3;
			console.log(num3);// => undefined
			num3 = 3;
			
			var nunFunc = function(){
				console.log(num3);// => undefined
				var num3 = 33;
				return num3;
				//即这段代码被解释为
				/* 
					var num3;//虽然函数外部有名为num3的全局变量，但函数内var的声明将num3覆盖。
					console.log(num3);
					num3 = 33;
				 */
			}
			console.log(nunFunc());// => 33
		</script>
	</body>
</html>